\hypertarget{group___music}{
\section{Music}
\label{group___music}\index{Music@{Music}}
}
\subsection*{Data Structures}
\begin{DoxyCompactItemize}
\item 
struct \hyperlink{struct_note}{Note}
\item 
struct \hyperlink{struct_song}{Song}
\end{DoxyCompactItemize}
\subsection*{Enumerations}
\begin{DoxyCompactItemize}
\item 
enum \hyperlink{group___music_gaefe1643414c0ec93d38868109a8184cc}{NotesN} \{ \par
{\bfseries C0}, 
{\bfseries Cs0}, 
{\bfseries D0}, 
{\bfseries Ds0}, 
\par
{\bfseries E0}, 
{\bfseries F0}, 
{\bfseries Fs0}, 
{\bfseries G0}, 
\par
{\bfseries Gs0}, 
{\bfseries A0}, 
{\bfseries As0}, 
{\bfseries B0}, 
\par
{\bfseries C1}, 
{\bfseries Cs1}, 
{\bfseries D1}, 
{\bfseries Ds1}, 
\par
{\bfseries E1}, 
{\bfseries F1}, 
{\bfseries Fs1}, 
{\bfseries G1}, 
\par
{\bfseries Gs1}, 
{\bfseries A1}, 
{\bfseries As1}, 
{\bfseries B1}, 
\par
{\bfseries C2}, 
{\bfseries Cs2}, 
{\bfseries D2}, 
{\bfseries Ds2}, 
\par
{\bfseries E2}, 
{\bfseries F2}, 
{\bfseries Fs2}, 
{\bfseries G2}, 
\par
{\bfseries Gs2}, 
{\bfseries A2}, 
{\bfseries As2}, 
{\bfseries B2}, 
\par
{\bfseries C3}, 
{\bfseries Cs3}, 
{\bfseries D3}, 
{\bfseries Ds3}, 
\par
{\bfseries E3}, 
{\bfseries F3}, 
{\bfseries Fs3}, 
{\bfseries G3}, 
\par
{\bfseries Gs3}, 
{\bfseries A3}, 
{\bfseries As3}, 
{\bfseries B3}, 
\par
{\bfseries C4}, 
{\bfseries Cs4}, 
{\bfseries D4}, 
{\bfseries Ds4}, 
\par
{\bfseries E4}, 
{\bfseries F4}, 
{\bfseries Fs4}, 
{\bfseries G4}, 
\par
{\bfseries Gs4}, 
{\bfseries A4}, 
{\bfseries As4}, 
{\bfseries B4}, 
\par
{\bfseries C5}, 
{\bfseries Cs5}, 
{\bfseries D5}, 
{\bfseries Ds5}, 
\par
{\bfseries E5}, 
{\bfseries F5}, 
{\bfseries Fs5}, 
{\bfseries G5}, 
\par
{\bfseries Gs5}, 
{\bfseries A5}, 
{\bfseries As5}, 
{\bfseries B5}, 
\par
{\bfseries C6}, 
{\bfseries Cs6}, 
{\bfseries D6}, 
{\bfseries Ds6}, 
\par
{\bfseries E6}, 
{\bfseries F6}, 
{\bfseries Fs6}, 
{\bfseries G6}, 
\par
{\bfseries Gs6}, 
{\bfseries A6}, 
{\bfseries As6}, 
{\bfseries B6}, 
\par
{\bfseries C7}, 
{\bfseries Cs7}, 
{\bfseries D7}, 
{\bfseries Ds7}, 
\par
{\bfseries E7}, 
{\bfseries F7}, 
{\bfseries Fs7}, 
{\bfseries G7}, 
\par
{\bfseries Gs7}, 
{\bfseries A7}, 
{\bfseries As7}, 
{\bfseries B7}, 
\par
{\bfseries C8}, 
{\bfseries Cs8}, 
{\bfseries D8}, 
{\bfseries Ds8}
 \}
\item 
enum \hyperlink{group___music_ga6a7bb071c9718266fe2a1d43d56fe132}{NotesP} \{ \par
{\bfseries Do0}, 
{\bfseries Dos0}, 
{\bfseries Re0}, 
{\bfseries Res0}, 
\par
{\bfseries Mi0}, 
{\bfseries Fa0}, 
{\bfseries Fas0}, 
{\bfseries Sol0}, 
\par
{\bfseries Sols0}, 
{\bfseries La0}, 
{\bfseries Las0}, 
{\bfseries Si0}, 
\par
{\bfseries Do1}, 
{\bfseries Dos1}, 
{\bfseries Re1}, 
{\bfseries Res1}, 
\par
{\bfseries Mi1}, 
{\bfseries Fa1}, 
{\bfseries Fas1}, 
{\bfseries Sol1}, 
\par
{\bfseries Sols1}, 
{\bfseries La1}, 
{\bfseries Las1}, 
{\bfseries Si1}, 
\par
{\bfseries Do2}, 
{\bfseries Dos2}, 
{\bfseries Re2}, 
{\bfseries Res2}, 
\par
{\bfseries Mi2}, 
{\bfseries Fa2}, 
{\bfseries Fas2}, 
{\bfseries Sol2}, 
\par
{\bfseries Sols2}, 
{\bfseries La2}, 
{\bfseries Las2}, 
{\bfseries Si2}, 
\par
{\bfseries Do3}, 
{\bfseries Dos3}, 
{\bfseries Re3}, 
{\bfseries Res3}, 
\par
{\bfseries Mi3}, 
{\bfseries Fa3}, 
{\bfseries Fas3}, 
{\bfseries Sol3}, 
\par
{\bfseries Sols3}, 
{\bfseries La3}, 
{\bfseries Las3}, 
{\bfseries Si3}, 
\par
{\bfseries Do4}, 
{\bfseries Dos4}, 
{\bfseries Re4}, 
{\bfseries Res4}, 
\par
{\bfseries Mi4}, 
{\bfseries Fa4}, 
{\bfseries Fas4}, 
{\bfseries Sol4}, 
\par
{\bfseries Sols4}, 
{\bfseries La4}, 
{\bfseries Las4}, 
{\bfseries Si4}, 
\par
{\bfseries Do5}, 
{\bfseries Dos5}, 
{\bfseries Re5}, 
{\bfseries Res5}, 
\par
{\bfseries Mi5}, 
{\bfseries Fa5}, 
{\bfseries Fas5}, 
{\bfseries Sol5}, 
\par
{\bfseries Sols5}, 
{\bfseries La5}, 
{\bfseries Las5}, 
{\bfseries Si5}, 
\par
{\bfseries Do6}, 
{\bfseries Dos6}, 
{\bfseries Re6}, 
{\bfseries Res6}, 
\par
{\bfseries Mi6}, 
{\bfseries Fa6}, 
{\bfseries Fas6}, 
{\bfseries Sol6}, 
\par
{\bfseries Sols6}, 
{\bfseries La6}, 
{\bfseries Las6}, 
{\bfseries Si6}, 
\par
{\bfseries Do7}, 
{\bfseries Dos7}, 
{\bfseries Re7}, 
{\bfseries Res7}, 
\par
{\bfseries Mi7}, 
{\bfseries Fa7}, 
{\bfseries Fas7}, 
{\bfseries Sol7}, 
\par
{\bfseries Sols7}, 
{\bfseries La7}, 
{\bfseries Las7}, 
{\bfseries Si7}, 
\par
{\bfseries Do8}, 
{\bfseries Dos8}, 
{\bfseries Re8}, 
{\bfseries Res8}
 \}
\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
void \hyperlink{group___music_ga8775bebfe360d9a11f9b163457033d47}{speaker\_\-on} ()
\item 
void \hyperlink{group___music_gaddcc91b3923481afa543b7bfa7a48409}{speaker\_\-off} ()
\item 
void \hyperlink{group___music_gad0b94ab781561a4be7a2b2005da9ff92}{play\_\-note} (\hyperlink{struct_note}{Note} $\ast$note)
\item 
void \hyperlink{group___music_ga67d79eecd73c5954729a7dd34af5d1c5}{play\_\-song} (\hyperlink{struct_song}{Song} $\ast$s)
\end{DoxyCompactItemize}
\subsection*{Variables}
\begin{DoxyCompactItemize}
\item 
float \hyperlink{group___music_ga14961692ca6c47d43cc4f13219156abd}{notes\_\-frequency} \mbox{[}$\,$\mbox{]}
\end{DoxyCompactItemize}


\subsection{Detailed Description}
Music related functions 

\subsection{Enumeration Type Documentation}
\hypertarget{group___music_gaefe1643414c0ec93d38868109a8184cc}{
\index{Music@{Music}!NotesN@{NotesN}}
\index{NotesN@{NotesN}!Music@{Music}}
\subsubsection[{NotesN}]{\setlength{\rightskip}{0pt plus 5cm}enum {\bf NotesN}}}
\label{group___music_gaefe1643414c0ec93d38868109a8184cc}
Natural notes names. 's' means sharp, e.g. Ds is D\# The central octave is the fourth, thus C4 is the \char`\"{}central C\char`\"{} \hypertarget{group___music_ga6a7bb071c9718266fe2a1d43d56fe132}{
\index{Music@{Music}!NotesP@{NotesP}}
\index{NotesP@{NotesP}!Music@{Music}}
\subsubsection[{NotesP}]{\setlength{\rightskip}{0pt plus 5cm}enum {\bf NotesP}}}
\label{group___music_ga6a7bb071c9718266fe2a1d43d56fe132}
French/Italian/Spanish/Portuguese notes names. 's' means sharp, e.g. Ds is D\# The central octave is the fourth, thus Do4 is the \char`\"{}central Do\char`\"{} 

\subsection{Function Documentation}
\hypertarget{group___music_gad0b94ab781561a4be7a2b2005da9ff92}{
\index{Music@{Music}!play\_\-note@{play\_\-note}}
\index{play\_\-note@{play\_\-note}!Music@{Music}}
\subsubsection[{play\_\-note}]{\setlength{\rightskip}{0pt plus 5cm}void play\_\-note ({\bf Note} $\ast$ {\em note})}}
\label{group___music_gad0b94ab781561a4be7a2b2005da9ff92}
Plays a single note \hypertarget{group___music_ga67d79eecd73c5954729a7dd34af5d1c5}{
\index{Music@{Music}!play\_\-song@{play\_\-song}}
\index{play\_\-song@{play\_\-song}!Music@{Music}}
\subsubsection[{play\_\-song}]{\setlength{\rightskip}{0pt plus 5cm}void play\_\-song ({\bf Song} $\ast$ {\em s})}}
\label{group___music_ga67d79eecd73c5954729a7dd34af5d1c5}
Plays a song using busy-\/waiting 
\begin{DoxyPre}
  usage example:\end{DoxyPre}



\begin{DoxyPre}  \hyperlink{struct_note}{Note} notes[] = \{\{Sol6, 100\}, \{Mi6,50\}, \{Sol6, 50\}, \{Mi6, 25\}\}; 
  \hyperlink{struct_song}{Song} s = \{ sizeof(notes)/sizeof(\hyperlink{struct_note}{Note}), 10, notes\};\end{DoxyPre}



\begin{DoxyPre}  play\_song(&s);
\end{DoxyPre}
 \hypertarget{group___music_gaddcc91b3923481afa543b7bfa7a48409}{
\index{Music@{Music}!speaker\_\-off@{speaker\_\-off}}
\index{speaker\_\-off@{speaker\_\-off}!Music@{Music}}
\subsubsection[{speaker\_\-off}]{\setlength{\rightskip}{0pt plus 5cm}void speaker\_\-off ()}}
\label{group___music_gaddcc91b3923481afa543b7bfa7a48409}
Turns the speeker off \hypertarget{group___music_ga8775bebfe360d9a11f9b163457033d47}{
\index{Music@{Music}!speaker\_\-on@{speaker\_\-on}}
\index{speaker\_\-on@{speaker\_\-on}!Music@{Music}}
\subsubsection[{speaker\_\-on}]{\setlength{\rightskip}{0pt plus 5cm}void speaker\_\-on ()}}
\label{group___music_ga8775bebfe360d9a11f9b163457033d47}
Turns the speeker on 

\subsection{Variable Documentation}
\hypertarget{group___music_ga14961692ca6c47d43cc4f13219156abd}{
\index{Music@{Music}!notes\_\-frequency@{notes\_\-frequency}}
\index{notes\_\-frequency@{notes\_\-frequency}!Music@{Music}}
\subsubsection[{notes\_\-frequency}]{\setlength{\rightskip}{0pt plus 5cm}float {\bf notes\_\-frequency}\mbox{[}$\,$\mbox{]}}}
\label{group___music_ga14961692ca6c47d43cc4f13219156abd}
Notes frequencies, in Hz, synchronized with arrays NotesN and NotesP. E.G. frequency\mbox{[}Do4\mbox{]} is the frequency of a central Do, 261.63Hz

NOTICE: this array is NOT defined in this header file, as variables should not be declared in header files. You have to copy/paste it to a source file ($\ast$.c).

float notes\_\-frequency\mbox{[}\mbox{]} = \{ 16.35, 17.32, 18.35, 19.45, 20.6, 21.83, 23.12, 24.5, 25.96, 27.5, 29.14, 30.87, 32.7, 34.65, 36.71, 38.89, 41.2, 43.65, 46.25, 49, 51.91, 55, 58.27, 61.74, 65.41, 69.3, 73.42, 77.78, 82.41, 87.31, 92.5, 98, 103.83, 110, 116.54, 123.47, 130.81, 138.59, 146.83, 155.56, 164.81, 174.61, 185, 196, 207.65, 220, 233.08, 246.94, 261.63, 277.18, 293.66, 311.13, 329.63, 349.23, 369.99, 392, 415.3, 440, 466.16, 493.88, 523.25, 554.37, 587.33, 622.25, 659.26, 698.46, 739.99, 783.99, 830.61, 880, 932.33, 987.77, 1046.5, 1108.73, 1174.66, 1244.51, 1318.51, 1396.91, 1479.98, 1567.98, 1661.22, 1760, 1864.66, 1975.53, 2093, 2217.46, 2349.32, 2489.02, 2637.02, 2793.83, 2959.96, 3135.96, 3322.44, 3520, 3729.31, 3951.07, 4186.01, 4434.92, 4698.64, 4978.03\}; 